<!DOCTYPE html>
<html onclick="Showstar(event)">
<head>
 <meta charset="UTF-8">
 <title>星星点灯</title>
	<script type="text/javascript">
	function Showstar(myevent)
	{
		//alert("X "+ myevent.clientX +"   "+ "Y "+myevent.clientY);
		var img_obj=document.createElement("img");
		img_obj.src="xingxing.gif";
		img_obj.width=getRandom(200,40);
		img_obj.style.position="absolute";
		img_obj.style.top=myevent.clientY-(img_obj.height/2)+"px";
		img_obj.style.left=myevent.clientX-(img_obj.width/2)+"px";
		document.body.appendChild(img_obj);
		
	}
	function getRandom(max,min)
	{
		var size=Math.random()*(max-min)+min;
		size=Math.ceil(size);
		return size;
	}
	
	</script>
 </head>
 <body style="background:black">

 </body>
 </html>